<?php
/**
 * The following variables are available in this template:
 * - $this: the CrudCode object
 */
?>
<?php echo "<?php\n"; ?>
/* @var $this <?php echo $this->getControllerClass(); ?> */
/* @var $model <?php echo $this->getModelClass(); ?> */

?>

<h1>View <?php echo $this->modelClass." #<?php echo \$model->{$this->tableSchema->primaryKey}; ?>"; ?></h1>

<?php echo "<?php"; ?> $this->widget('zii.widgets.CDetailView', array(
	'data'=>$model,
	'attributes'=>array(
<?php
foreach($this->tableSchema->columns as $column)
{
	switch ($column->name) {
		case 'title':
		case 'content':
			$output = "'".$column->name.":html'";
			break;
		case 'visible':
		case 'del_flg':
			$output = "'".$column->name.":boolean'";
			break;
		case 'rank':
			$output = "'".$column->name.":number'";
			break;
		case 'create_time':
		case 'update_time':
			$output = "'".$column->name.":datetime'";
			break;
		default:
			$output = "'".$column->name."'";
			break;
	}
	echo "\t\t".$output.",\n";
}
?>
	),
)); ?>


<?php echo "<?php echo CHtml::link('Complete', array('admin')) ?>"; ?>